package com.chen.wow.day01.autowired;

import org.junit.Assert;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.test.context.ContextConfiguration;
import org.springframework.test.context.junit4.SpringJUnit4ClassRunner;

@RunWith(SpringJUnit4ClassRunner.class)
@ContextConfiguration(classes = CDPlayerConfig.class)
public class TestCDPlayer {
	@Autowired
	private SgtPeppers sgtPeppers;
	@Autowired
	private com.chen.wow.day01.autowired.named.SgtPeppers myName;
	@Autowired
	private CDPlayer CDPlayer;
	
	@Test
	public void cdShouldNotBeNull(){
		Assert.assertNotNull(sgtPeppers);
		Assert.assertNotNull(myName);
		Assert.assertNotNull(CDPlayer);
	}
	
	@Test
	public void show(){
		CDPlayer.show();
	}
}
